//
//  GGStatus_TwoTabCell.m
//  XTXOneToOne
//
//  Created by Canny on 2018/11/15.
//  Copyright © 2018年 WK. All rights reserved.
//

#import "GGStatus_TwoTabCell.h"

@implementation GGStatus_TwoTabCell

-(void)setDataSource:(LTOrderCellModel *)dataSource{
    self.lab2.text = @"开仓价";
    self.lab3.text = @"开仓数量";
    [super setDataSource:dataSource];
    if ([dataSource.is_position integerValue]==1) {
        [self.btn_status setTitle:@"平仓" forState:UIControlStateNormal];
        self.btn_status.hidden=NO;
        self.btn_status.userInteractionEnabled=YES;
    }else if ([dataSource.order_status integerValue]==2){
        [self.btn_status setTitle:@"平仓中" forState:UIControlStateNormal];
        self.btn_status.hidden=NO;
        self.btn_status.userInteractionEnabled=NO;
    }else{
        self.btn_status.hidden=YES;
    }
//    @0:待成交；@1:已成交；@2:平仓中;@3:撤销
}

-(void)statusAction{
    if (self.block) {
        self.block(self.dataSource.order_sn);
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
